<?php
/*
	session_unset();
    session_destroy();
    session_write_close();
    setcookie(session_name(),'',0,'/');
    session_regenerate_id(true);
*/
?>
#CACHE{0}
    <B_cart>
    <input type="hidden" id="num_products" name="num_products" value="#TOTAL_BOUCLE" />
	<div class="vendor_title">Ваш заказ</div>
<div class="all_elements">
	<BOUCLE_cart(POUR) {tableau #PRODUCTS} >
[(#REM) Это id_article]
		[(#SET{item,[(#VALEUR|table_valeur{0})]})]
[(#REM) Это количество]
		[(#SET{qnty,[(#VALEUR|table_valeur{1})]})]
[(#REM) Это опции]
		[(#SET{options,[(#VALEUR|table_valeur{2})]})]
[(#REM) ID товара в массиве корзины]
		[(#SET{id_article,[(#CLE)]})]


	    <BOUCLE_product(ARTICLES spip_ecatalogue_products){statut=publie}{id_article=#GET{item}}>
    	    <div class="one_element">
			<div class="first">
    	        [<a href="IMG/(#LOGO_ARTICLE|fichier)" rel="gallery">
        	        [(#LOGO_ARTICLE|image_reduire{111})]
            	</a>]
	        </div>  	
       
    	    <div class="second">
        	    <a target="_blank" href="#URL_ARTICLE">#TITRE #GET{id_article}</a>
				<p><BOUCLE_options(POUR) {tableau #GET{options} }>#CLE#VALEUR</BOUCLE_options></p>
	            <p> <span>цена:</span> #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE,UAH} грн.</p>
    	    </div>	
			
	        <div class="third">
    	    <input class="quantity item_quantity" type="text" name="#ID_ARTICLE" value="[(#GET{qnty})]"
        	         data-id_product="#GET{id_article}" />
	        </div>
                       
			<div class="fourth"> 
        	    <p>[(#ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE,UAH,'price',#GET{qnty}})]   <span>грн</span></p>            
           
	        </div>
		
    	    <div class="fifth">
                <a class="delete_link" href="javascript:;" title="удалить товар" data-id_product="#GET{id_article}" >  </a>                
	        </div>
		</div>	
	    </BOUCLE_product>
	</BOUCLE_cart>
</div>	
   
	
   <div class="sum-block">
    [(#REM) С целью оптимизации один раз возьмем знаки валюты и запишем их в переменные. Берем текущую выбранную/заданную валюту]
    #SET{currency_sign_pre, #ECATALOGUE_CURRENCY_SIGN{'', sign_pre}}
    #SET{currency_sign_after, #ECATALOGUE_CURRENCY_SIGN{'', sign_after}}
    <p class="totall"><span>Итого:</span>  [(#ALOHACART_CART_PRICE{UAH})] грн</p>
    <p class="shipp">[<span>Доставка:</span> (#SHIPPING_COST) грн]</p>
    <p class="atall">[<strong>Всего:</strong> <span>(#ORDER_TOTAL_PRICE) грн]</span></p>
</div>	
</B_cart>

    
<?php if (lire_config('alohacart/add_spinner')) { ?>
        <script src="#CHEMIN{includes/smartspin/smartspinner.js}" type="text/javascript"></script>
        <link href="#CHEMIN{includes/smartspin/smartspinner.css}" rel="stylesheet" type="text/css" />
<?php } ?>
 <script>
    var id_product_change_quantity = '#ENV{id_product_change_quantity}';
    
    jQuery('.quantity').each(function(){
        <?php if (lire_config('alohacart/add_spinner')) { ?>
        jQuery(this).spinit({min:0/*,max:10*/,stepInc:1,height:22,initValue:jQuery(this).val() });
        <?php } ?>
        if (jQuery(this).attr('data-id_product') == id_product_change_quantity)
            jQuery(this).focus();
    });
    
 </script>        